package appapi.service;

import appapi.Request.AlarmPageReq;
import appapi.Vo.brider.AlarmHandleVO;
import appapi.Vo.brider.AlarmVO;
import appapi.entity.basic.UserInfo;
import appapi.entity.bridge.DeviceAlarm;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author hlm
 * @date
 * @description: 设备告警记录
 */
@Repository
public interface AlarmService extends IService<DeviceAlarm> {

    /**
     * 分页查询设备告警记录列表
     *
     * @return
     */
    IPage<AlarmVO> getAlarmByPage(AlarmPageReq req);

    /**
     * 查询设备告警记录列表
     *
     * @return
     */
    List<AlarmVO> getAlarmList(AlarmPageReq req);

    /**
     * 删除
     *
     * @return
     */
    void delAlarm(Long id);

    /**
     * 告警自动恢复
     *
     * @return
     */
    Integer autoRestoreAlarm(DeviceAlarm entity);

    /**
     * 手动恢复/处置
     *
     * @return
     */
    void updateAlarm(AlarmHandleVO alarmHandleVO, UserInfo userInfo);
}
